import http from "@utils/request";
import { ILoginRequest, UserRuleForm } from "@/types/login";

export const getCaptchaImage = (data: {
    uuid: string
}): Promise<ArrayBuffer> => {
    return http.get<ArrayBuffer>('/captcha.jpg', data, { responseType: 'arraybuffer' })
}
//用户登录
export const loginSys = (data: UserRuleForm): Promise<ILoginRequest> => {
    return http.post<ILoginRequest>('/sys/login', data, {});
}